<?php

$params = call_user_func_array(['yii\helpers\ArrayHelper', 'merge'], [
    require(__DIR__ . '/../../../common/config/params.php'),
    require(__DIR__ . '/../../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
]);


return [
    'id' => 'app-paymch',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'paymch\controllers',
    'components' => [
        'log' => [
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['info', 'error', 'warning'],
                    'logFile' => '@runtime/logs/' . date('Ym/') . 'payment_' . date('d') . '.log',
                    'logVars' => ['_GET', '_POST'],
                    'categories' => ['payment'],
                ]
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<module>/<controller:\w+>/<id:\d+>' => '<module>/<controller>/view',
            ],
        ],
    ],
    'params' => $params,
];

